package ANDROID_RLK_SQLCON;

public class Example {
    protected void onCreate(Bundle bundle) {
        super.onCreate(bundle);
        final SQLiteDatabase database = openOrCreateDatabase(DB_NAME, Context.MODE_PRIVATE, null);
        final Cursor query = database.query(DATABASE_TABLE,
                new String[]{KEY_FILE, KEY_DATE, KEY_COMMENT},
                null,
                null,
                null,
                null,
                KEY_DATE + " asc");
        startManagingCursor(query);

        ListAdapter adapter = new SimpleCursorAdapter(this,
                android.R.layout.simple_list_item_1,
                query,
                new String[]{Contacts.People.NAME},
                new int[]{android.R.id.text1});
        setListAdapter(adapter);
    }
}
